﻿@model cloudscribe.Core.Web.ViewModels.SystemInfo.SystemInfoViewModel
@using cloudscribe.Core.Web
@using cloudscribe.Web.Navigation
@using Microsoft.Extensions.Options
@using Microsoft.Extensions.Localization
@inject IStringLocalizer<CloudscribeCore> sr
@{ 
    ViewData["BodyClass"] = "admin-section system-info";
    var versionFormat = sr["{0} Version"];
}
<div class="row">
    <div class="col-md-10 col-md-push-2">
        <h1>@ViewData["Title"]</h1>

        <table class="table table-striped">
            <tr>
                <th>@sr["Server Host Name"]</th>
                <td>@Model.Name</td>
            </tr>
            <tr>
                <th>@sr["Server IP Address"]</th>
                <td>@Model.LocalAddress</td>
            </tr>
            <tr>
                <th>@sr["Server Time UTC"]</th>
                <td>@Model.ServerTimeUtc</td>
            </tr>
            <tr>
                <th>@sr["Operating System"]</th>
                <td>@Model.OperatingSystem</td>
            </tr>
            <tr>
                <th>@sr["Runtime"]</th>
                <td>@Model.Runtime</td>
            </tr>
            <tr>
                <th>@sr["Environment Name"]</th>
                <td>@Model.EnvironmentName</td>
            </tr>
            <tr>
                <th>@sr["Database Platform"]</th>
                <td>@Model.DatabasePlatform</td>
            </tr>
            <tr>
                <th>@sr["cloudscribe.Core.Web"]</th>
                <td>@Model.CloudscribeCoreVersion</td>
            </tr>
            @foreach (var v in Model.OtherVersions)
            {
                <tr>
                    <th>@v.Key</th>
                    <td>@v.Value</td>
                </tr>
            }
        </table>
		@{ await Html.RenderPartialAsync("CustomContentPartial", Model); }
        @await Component.InvokeAsync("Navigation", new { viewName = "ChildTree", filterName = NamedNavigationFilters.ChildTree, startingNodeKey = "" })
    </div>
    <div class="col-md-2 col-md-pull-10 hidden-xs hidden-sm">
        @await Component.InvokeAsync("Navigation", new { viewName = "SideNavAlt1", filterName = NamedNavigationFilters.ParentTree, startingNodeKey = "SiteAdmin" })
    </div>
</div>
@section scripts {
    @{ await Html.RenderPartialAsync("_SideMenuScriptsPartial"); }
}
